1. Field of the Invention
The present invention relates to a method for binarizing initial script on an operating system and an operating method of binary script and, more particularly, to a method for binarizing initial script on an operating system capable of implementing quick booting by efficiently binarizing the initial script used for booting an embedded operating system, binary script, and an operating method of the same.
2. Description of the Related Art
Booting is a process to initialize a system and prepare an application program which a user will need in order to use an operating system.
During the booting process, a system initialization step which is a third step is constituted by script which an aggregation of a series of commands.
The script is written on a file as a series of procedures by automating a process in which the user proceeds to input a command on a shell. At this time, the script is referred to as shell script.
The shell script is provided in a secondary memory unit and a kernel which a core function of the operating system calls and initializes the corresponding shell script as the last process of the initialization process. Since the shell script is an aggregation of commands that are being performed on the shell, the shell is required to perform the command in the shell script.
Commands including the shell are constituted by processes due to characteristics of a UNIX-based operating system, a start scheme of the process follows a fork & exec technique. Herein, the fork & exec is one of kernel-supported application program interfaces (API).
First, the fork technique is a technique to create a new process by copying the process itself. At this time, a relationship between the new created process and the original process can be expressed as a relationship between Parents and children. That is, the newly created process serves as a child process of the original process.
Meanwhile, the exec technique is a technique executed by receiving a new command from the secondary memory unit to the exec to substitute the command itself for the new command. When two techniques are mixed up, the operating system can execute the new command.
By this method, the corresponding procedure is repeated until the shell script is terminated. In general, a command to operate a user application program is described in the last shell script so as to perform a fourth step of the booting.
When the shell script is used at a third step of the booting, the user who can use the shell script can easily modify the initialization process. However, when the shell script is used, booting speed is delayed.
In other words, since the shell script is an aggregation of character strings, a complicated text analysis is required to analyze each of the character strings as the command. Since a repetitive operation is generally performed in the text analyzing process, a processing time is extended and it is difficult to predict its termination.
Further, the fork & exec technique is used in order to perform the command in the shell script. That is, a new process needs to be created in order to execute the command of the shell script and the newly created process is converted into the command through a transition (exec) process. Therefore, several complicated processes are performed without directly executing the command, such that the booting time is delayed.
Meanwhile, common users use a graphical user interface (GUI) based on graphics and an application program which the users desire to use are also converted into programs requiring enhanced complexity. As a result, the initial shell script is gradually lengthened as the application program becomes complicated. Therefore, a long booting delay time is required in order to perform the shell script during booting the operating system.
As described above, since the fork & exec technique is required to be used in order to perform the further lengthened initial shell script, the booting delay cannot be solved by the present method.